//
//  SecondNavigationBar.swift
//  Weibo2
//
//  Created by 伏文东 on 2018/2/6.
//  Copyright © 2018年 伏文东. All rights reserved.
//

import UIKit

class SecondNavigationBar: UINavigationBar {

    override func layoutSubviews() {
        super.layoutSubviews()
        
        for subview in subviews {
            let stringFromClass = NSStringFromClass(subview.classForCoder)
            if stringFromClass.contains("BarBackground") {
                subview.frame = self.bounds
            } else if stringFromClass.contains("UINavigationBarContentView") {
                subview.frame = CGRect(x: 0, y: 20, width: UIScreen.screenWidth(), height: 44)
            }
        }
    }
    
}
